package Code.Day7_20240924.com.dx.day07;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @ClassName Test01
 * @Description TODO:
 * @Author 12994
 * @Date 2024/9/24 10:10
 * @Version 1.0
 **/
public class Test01 {
    public static void main(String[] args) {
        List<Computer> list = Arrays.asList(
                new Pc(),
                new Server(),
                new Pc()
        );

//        list.forEach(Computer::show);
        list.forEach(Test01::transform);


    }

    public static void transform(Computer computer) {
        computer.show();
    }

}
